<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	请输入城市：<input type="text" id="city">
</body>
</html>
<script src="../../jquery-2.1.4.min.js"></script>
<script type="text/javascript">
	$("#city").blur(function(){
		var city = $(this).val();
		$.ajax({
			url:"index.php",
			data:{city:city},
			dataType:"json",
			type:"post",
			success:function(res){
				console.log(res);
			}
		});
});
			
	

		
</script>